home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / bevelPlusSetOptionVars.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  5.5 KB  |  163 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. // Copyright (C) 1997-2001 Alias|Wavefront,
  18. // a division of Silicon Graphics Limited.
  19. //
  20. // The information in this file is provided for the exclusive use of the
  21. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  22. // and incorporate this code into other products for purposes authorized
  23. // by the Alias|Wavefront license agreement, without fee.
  24. //
  25. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  26. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  27. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  28. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  29. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  30. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  31. // PERFORMANCE OF THIS SOFTWARE.
  32. //
  33. //
  34. //  Alias|Wavefront Script File
  35. //  MODIFY THIS AT YOUR OWN RISK
  36. //
  37. //  Creation Date:  April 21 1997
  38. //
  39. //
  40. //  Description:
  41. //      Global function to ensure the options for bevel plus are set.
  42. //
  43. //  Input Arguments:
  44. //      Force the factory setting or not.
  45. //
  46. //  Return Value:
  47. //      None.
  48. //
  49.  
  50. global proc bevelPlusSetOptionVars( 
  51.     int $forceFactorySettings )
  52. //
  53. //
  54. //
  55. {
  56.     if ($forceFactorySettings || !`optionVar -exists bevelPlusWidth`) {
  57.         optionVar -floatValue bevelPlusWidth 0.1 ;
  58.     }
  59.  
  60.     if ($forceFactorySettings || !`optionVar -exists bevelPlusDepth`) {
  61.         optionVar -floatValue bevelPlusDepth 0.1 ;
  62.     }
  63.  
  64.     if ($forceFactorySettings || !`optionVar -exists bevelPlusExtrudeHeight`) {
  65.         optionVar -floatValue bevelPlusExtrudeHeight 0.25 ;
  66.     }
  67.  
  68.     // Bevel curves forced to straight
  69.     //
  70.     if ($forceFactorySettings || !`optionVar -exists innerStyleBevelCurve`){
  71.         optionVar -intValue innerStyleBevelCurve 0;
  72.     }
  73.     if ($forceFactorySettings || !`optionVar -exists outerStyleBevelCurve`){
  74.         optionVar -intValue outerStyleBevelCurve 0;
  75.     }
  76.  
  77.     // attach Surfaces.
  78.     // attach is set to true.
  79.     //
  80.     if ($forceFactorySettings || !`optionVar -exists bevelPlusAttachSurfaces`){
  81.         optionVar -intValue bevelPlusAttachSurfaces 1;
  82.     }
  83.  
  84.     // Bevel inner curve same as outer
  85.     //
  86.     if ($forceFactorySettings || !`optionVar -exists innerStyleSameAsOuter`){
  87.         optionVar -intValue innerStyleSameAsOuter 1;
  88.     }
  89.  
  90.     // Number of sides.
  91.     // 1 - only extrude.
  92.     // 2 - bevel top and extrude.
  93.     // 3 - bevel bottom and extrude.
  94.     // 4 - bevel both ends and extrude.
  95.     //
  96.     if ($forceFactorySettings || !`optionVar -exists bevelPlusNSides`){
  97.         optionVar -intValue bevelPlusNSides 4;
  98.     }
  99.  
  100.     // Number of caps.
  101.     // 1 - None
  102.     // 2 - At Start
  103.     // 3 - At End
  104.     // 4 - At Start and End
  105.     //
  106.     if ($forceFactorySettings || !`optionVar -exists bevelPlusCaps`){
  107.         optionVar -intValue bevelPlusCaps 4;
  108.     }
  109.  
  110.     // bevelPlusOutputPolygons (int) - 
  111.     // 0 - NURBS
  112.     // 1 - polys
  113.     // 2 - Bezier surfaces (NOT supported at present)
  114.     // 3 - subdivision surfaces
  115.     //
  116.     if ($forceFactorySettings || !`optionVar -exists bevelPlusOutputPolygons`){
  117.         optionVar -intValue bevelPlusOutputPolygons 1;
  118.        }
  119.  
  120.     // Global or local tolerance:
  121.     if( $forceFactorySettings || !`optionVar -exists bevelPlusUseGlobalTol` ){
  122.         optionVar -intValue bevelPlusUseGlobalTol false;
  123.     }
  124.  
  125.     // Tolerance for bevelPlus
  126.     if ($forceFactorySettings || !`optionVar -exists bevelPlusTolerance`){
  127.         optionVar -floatValue bevelPlusTolerance 0.01;
  128.     }
  129.  
  130.     // Now, the poly conversion options:
  131.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyFormat` ) {
  132.         optionVar -iv bevelPlusPolyFormat 2;
  133.     }
  134.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyCount` ) {
  135.         optionVar -iv bevelPlusPolyCount 200;
  136.     }
  137.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyUseChordRatio` ) {
  138.         optionVar -iv bevelPlusPolyUseChordRatio 0;
  139.     }
  140.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyChordRatio` ) {
  141.         optionVar -fv bevelPlusPolyChordRatio 0.1;
  142.     }
  143.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyUseChordHeight` ) {
  144.         optionVar -iv bevelPlusPolyUseChordHeight 0;
  145.     }
  146.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyChordHeight` ) {
  147.         optionVar -fv bevelPlusPolyChordHeight 1.0;
  148.     }
  149.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyTypeU` ) {
  150.         optionVar -iv bevelPlusPolyTypeU 3;
  151.     }
  152.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyTypeV` ) {
  153.         optionVar -iv bevelPlusPolyTypeV 3;
  154.     }
  155.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyNumberU` ) {
  156.         optionVar -iv bevelPlusPolyNumberU 2;
  157.     }
  158.     if( $forceFactorySettings || !`optionVar -ex bevelPlusPolyNumberV` ) {
  159.         optionVar -iv bevelPlusPolyNumberV 6;
  160.     }
  161. }
  162.  
  163.